package edu.ec.java02.group02.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@Table(name="t_order")
public class Order implements Serializable {
    @Id
    @Column(name = "order_id")
    private Integer orderId;

    @Column(name = "order_no")
    private String orderNo;

    @Column(name = "order_status")
    private String orderStatus;

    @Column(name = "order_creat_time")
    private Date orderCreatTime;

    @Column(name = "order_pay_time")
    private Date orderPayTime;

    @Column(name = "order_finish_time")
    private Date orderFinishTime;

    @Column(name = "order_cancel_time")
    private Date orderCancelTime;

    private static final long serialVersionUID = 1L;

    /**
     * @return order_id
     */
    public Integer getOrderId() {
        return orderId;
    }

    /**
     * @param orderId
     */
    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    /**
     * @return order_no
     */
    public String getOrderNo() {
        return orderNo;
    }

    /**
     * @param orderNo
     */
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo == null ? null : orderNo.trim();
    }

    /**
     * @return order_status
     */
    public String getOrderStatus() {
        return orderStatus;
    }

    /**
     * @param orderStatus
     */
    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus == null ? null : orderStatus.trim();
    }

    /**
     * @return order_creat_time
     */
    public Date getOrderCreatTime() {
        return orderCreatTime;
    }

    /**
     * @param orderCreatTime
     */
    public void setOrderCreatTime(Date orderCreatTime) {
        this.orderCreatTime = orderCreatTime;
    }

    /**
     * @return order_pay_time
     */
    public Date getOrderPayTime() {
        return orderPayTime;
    }

    /**
     * @param orderPayTime
     */
    public void setOrderPayTime(Date orderPayTime) {
        this.orderPayTime = orderPayTime;
    }

    /**
     * @return order_finish_time
     */
    public Date getOrderFinishTime() {
        return orderFinishTime;
    }

    /**
     * @param orderFinishTime
     */
    public void setOrderFinishTime(Date orderFinishTime) {
        this.orderFinishTime = orderFinishTime;
    }

    /**
     * @return order_cancel_time
     */
    public Date getOrderCancelTime() {
        return orderCancelTime;
    }

    /**
     * @param orderCancelTime
     */
    public void setOrderCancelTime(Date orderCancelTime) {
        this.orderCancelTime = orderCancelTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orderId=").append(orderId);
        sb.append(", orderNo=").append(orderNo);
        sb.append(", orderStatus=").append(orderStatus);
        sb.append(", orderCreatTime=").append(orderCreatTime);
        sb.append(", orderPayTime=").append(orderPayTime);
        sb.append(", orderFinishTime=").append(orderFinishTime);
        sb.append(", orderCancelTime=").append(orderCancelTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}